import request from '@/utils/request'

// 查询仓位标尺列表
export function listScale(query) {
  return request({
    url: '/locates/scale/list',
    method: 'get',
    params: query
  })
}

// 查询仓位标尺详细
export function getScale(scaleId) {
  return request({
    url: '/locates/scale/' + scaleId,
    method: 'get'
  })
}

// 新增仓位标尺
export function addScale(data) {
  return request({
    url: '/locates/scale',
    method: 'post',
    data: data
  })
}

// 修改仓位标尺
export function updateScale(data) {
  return request({
    url: '/locates/scale',
    method: 'put',
    data: data
  })
}

// 删除仓位标尺
export function delScale(scaleId) {
  return request({
    url: '/locates/scale/' + scaleId,
    method: 'delete'
  })
}

// 查询仓位标尺数据
export function getMapScale(parentId) {
  return request({
    url: '/locates/scale/data/' + parentId,
    method: 'get'
  })
}
